/**
 * 文体活动api
 */

import request from '@/utils/request'
import {
    unionApiUrl
} from '@/api/config.js'

const api = unionApiUrl + "/unionBookHouse" //职工书屋
const apiActivity = unionApiUrl + "/unionCulturalActivity" //职工书屋

/**
 * 职工书屋api
 */
// 职工书屋列表
export function getPageUnionBookHouse(data) {
    return request.post(`${api}/getPageUnionBookHouse`, data)
}

// 删除 -职工书屋
export function deleteUnionBookHouse(data) {
    return request.post(`${api}/deleteByPrimaryKey`, data)
}

// 详情 - 职工书屋
export function getUnionBookHouse(id) {
    return request.get(`${api}/getUnionBookHouseById/${id}`)
}

// 新增 -职工书屋
export function addUnionBookHouse(data) {
    return request.post(`${api}/insertSelective`, data)
}

// 导入新增 -职工书屋
export function addUnionBookHouseImport(data) {
    return request.post(`${api}/insertSelectiveList`, data)
}

// 编辑
export function updateUnionBookHouse(data) {
    return request.post(`${api}/updateByPrimaryKeySelective`, data)
}

/**
 * 文体活动api
 */

// 文体活动列表
export function getPageUnionActivity(data) {
    return request.post(`${apiActivity}/getPageUnionCulturalActivity`, data)
}

// 删除 -文体活动
export function deleteUnionActivity(data) {
    return request.post(`${apiActivity}/deleteByPrimaryKey`, data)
}

// 详情 - 文体活动
export function getUnionActivityById(id) {
    return request.get(`${apiActivity}/getUnionCulturalActivityById/${id}`)
}

// 新增 -文体活动
export function addUnionActivity(data) {
    return request.post(`${apiActivity}/insertSelective`, data)
}

// 编辑 - 文体活动
export function updateUnionActivity(data) {
    return request.post(`${apiActivity}/updateByPrimaryKeySelective`, data)
}